from yolov5 import YOLOv5

class PeopleDetector:
    def __init__(self):
        self.model = YOLOv5('yolov5s.pt')
        self.model.classes = [0]
        self.model.conf = 0.5

    def detect(self, img_path):
        results = self.model.predict(img_path)
        return results.pandas().xyxy[0], results.render()[0]